<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <title>Document</title>
    <style>
        .box{
            border: 1px solid gray;
           background-color: #ddd;
        }
        .red{
            color: white;
            background-color: red;
        }  
        .b{
            height: 200px;
            background-color: yellow;
            display: none;
        }
    </style>
</head>
<body>
    <script src="./js/jquery.min.js"></script>

    <div class="container">
        <div class="row box">
           <button class="btn btn-secondary">下拉滑动</button>
            <button class="btn btn-secondary">上拉滑动</button>
            <button class="btn btn-secondary">上拉滑动</button>
            <button class="btn btn-secondary">上拉滑动</button>
            <button class="btn btn-secondary">上拉滑动</button>
        </div>
       <div class="b col-md-6"></div>
    </div>

<script>
    $(function(){
       
        $('button').eq(0).click(function () {

            $('.b').slideUp('low', 'linear');
            
        })
        $('button').eq(1).click(function () {
            
            $('.b').slideDown('low','linear');
            console.log($('.b').index())

        })
        $('button').eq(2).click(function () {

            $('.b').fadeOut('low', 'linear');
            
        })
        $('button').eq(3).click(function () {
            
            $('.b').fadeIn('low','linear');
            console.log($('.b').index())

        })
        $('button').eq(2).hover(function () {

            $('.b').fadeToggle('low', 'linear');
            
        })
        $('button').eq(3).hover(function () {
            
            $('.b').slideToggle('low','linear');
            console.log($('.b').index())

        })
        
    })
        
</script>
</body>
</html>